Process Platform Authentication Plug-in |
The cordys.authentication plug-in handles authentications for connecting to a Cordys server. It also contains API to retrieve the current user and organization details.The plugin supports the following types of authentications
- Web server-based authentication (Windows Authentication or Basic Authentication).
- Process Platform Single Sign-On authentication.
Methods
The following methods are supported by the cordys.authentication plug-in:
Table 1. List of Methods
| Method | Description |
|---|---|
| getUser() | This method returns a jQuery deferred which will provide the detail of the current user and organization when resolved. It will return back the user object with the following properties.
|
| login() | This method will initiate the login process. Redirect to the login page which can be configured with the loginURL property. If no loginURL is configured, it will be redirected to the default log in page. The method will return a deferred which will be resolved after login. |
| logout() | Logout from the Process Platform server instance. |
Examples
The following are the sample code snippets:
$.cordys.authentication.getUser().done(function(userObject){ var userDN = userObject.userDN; var organizationDN = userObject.organizationDN; var organizationName = userObject.organizationName ; var userName = userDetails.userName }
$.cordys.authentication.login().done(function() { // do your actions })
$.cordys.authentication.logout()